package com.acoreful.ackitcloud.config;

import com.acoreful.ackitcloud.common.trim.Trimmed;
import com.acoreful.ackitcloud.common.trim.TrimmedAnnotationFormatterFactory;
import org.springframework.format.FormatterRegistry;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@Component
public class MyWebMvcConfig extends WebMvcConfigurationSupport {

    @Override
    protected void addFormatters(FormatterRegistry registry) {
        registry.addFormatterForFieldAnnotation(new TrimmedAnnotationFormatterFactory());
        super.addFormatters(registry);
    }
}
